package com.carnation.service;

import java.io.File;
import java.io.InputStream;
import java.util.List;
import java.util.Map;

import com.carnation.bean.FileInfo;
import com.carnation.bean.LocalFileInfo;
import com.carnation.bean.Menu;
import com.carnation.bean.User;

public interface FileService {

	public boolean createDirectory(Menu menu,User user);
	
	public List<FileInfo> getFileInfoListByCondition(String catalogId,String name,String user,String start,String end,String desc,String remark);
	
	public File findFileByNameAndCatalogId(String name,String catalogId);
	
	public boolean checkFileExistByCatalogIdAndName(String catalogId,String name)throws Exception;
	
	public String getStorePathByCatalogId(String catalogId)throws Exception;
	
	public void writeFileInfo(FileInfo fileInfo) throws Exception;
	
	public boolean deleteFile(String catalogId,String filename);

	public Map<String,Long> getFileNameListByCatalogId(String catalogId);
	
	public List<String> getAllCatalogId();
	
	public String getRealPath(String fakePath);
	
	public List<LocalFileInfo> getLocalFileInfoByRealPath(String path);
	
	public InputStream getFileInputStream(String realPath,String filename);
}
